#ifndef _H_TRANSENC
#define _H_TRANSENC

#include <wchar.h>
#include "hplatform.h"
#include "aes.h"

#ifdef __cplusplus
extern "C" {
#endif // #ifdef __cplusplus

#define DOCTE_ENC_MAXKEYCOUNT           16

int HPLATFORMCALL docte_encrypt_to(const char* enc_this, const char* to_this, int* keys, int key_count);
#if _MSC_VER
int HPLATFORMCALL docte_encrypt_to16(const wchar_t* enc_this, const wchar_t* to_this, int* keys, int key_count);
#endif // #if _MSC_VER

int HPLATFORMCALL docte_decrypt_to(const char* dec_this, const char* to_this, int* keys, int key_count);
#if _MSC_VER
int HPLATFORMCALL docte_decrypt_to16(const wchar_t* dec_this, const wchar_t* to_this, int* keys, int key_count);
#endif // #if _MSC_VER

// if the file is encrypted, return value is 0, otherwise 1. 
// keys and key_count parameter can be null if you wanna check file status only.
int HPLATFORMCALL docte_getenckeys(const char* file_name, int* keys, int* key_count);
#if _MSC_VER
int HPLATFORMCALL docte_getenckeys16(const wchar_t* file_name, int* keys, int* key_count);
#endif // #if _MSC_VER

//set the encrypted file's keys 
int HPLATFORMCALL docte_setenckeys(const char* file_name, const int* keys, int key_count);
#if _MSC_VER
int HPLATFORMCALL docte_setenckeys16(const wchar_t* file_name, const int* keys, int key_count);
#endif // #if _MSC_VER

// if target file can decrypt by specific key, return 0
int HPLATFORMCALL docte_decrypt_test(const char* file_name, int* keys, int key_count);
#if _MSC_VER
int HPLATFORMCALL docte_decrypt_test16(const wchar_t* file_name, int* keys, int key_count);
#endif // #if _MSC_VER

#ifdef __cplusplus
}
#endif // #ifdef __cplusplus

#endif // #ifndef _H_TRANSENC
